﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Television
{
    class Program
    {
        static void Main(string[] args)
        {
            TV tv = new TV();
            Console.WriteLine("Enter the amount of channels you want to add.");
            int amount = Int32.Parse(Console.ReadLine());
            for (int i = 0; i < amount; i++)
            {
                Console.WriteLine("Enter the number of channel.");
                int number = Int32.Parse(Console.ReadLine());
                Console.WriteLine("Enter the name of channel.");
                string name = Console.ReadLine();
                Channel canal = new Channel(number,name);
                tv.Channels.Add(canal);
            }
            Console.WriteLine("Choose channel number to start with.");
            tv.CurrentChannel = Int32.Parse(Console.ReadLine());
            tv.ShowCurrentChannel();
            string choice = "";
            do
            {
                Console.WriteLine("\nChoose the button Up - U, or Down - D.");
                choice = Console.ReadLine().ToLower();
                switch (choice)
                {
                    case "u":
                        tv.SwitchChannelUp();
                        tv.ShowCurrentChannel();
                        break;
                    case "d":
                        tv.SwitchChannelDown();
                        tv.ShowCurrentChannel();
                        break;
                    default:
                        break;
                }
                
            } while (choice=="u" || choice=="d");
        }
    }
}
